<?php
require_once FOREGROUND_PC_COMMON_ACTION_DIR . '/member_ajax.php';

class foreground_pc_member_logout_action extends foreground_pc_member_ajax_common_action
{
    protected $_if_require_login = true;
    
    protected function _current_page_run()
    {
        //var_dump(__METHOD__); exit();
        
        $foreground_member_logout_action_service = wwy_resource_container::get_foreground_member_logout_action_service();        
        $foreground_member_logout_action_service->process();          
        
        unset($_SESSION['member_id']);
	    unset($_SESSION['member_mobile']);
	    unset($_SESSION['default_address_id']);
	    
	    $url = $this->get_url(array('route' => 'member_mobile_login'), true);
	    echo '<script type="text/javascript">window.top.location.replace("'. $url . '");</script>';
	    //exit();
    }
}